#pragma once
#include "Control.h"

namespace Spore
{
	class CheckBox : public Control
	{
	public:
		CheckBox(const char* name,const char* lable,Control* pParent = NULL,int x = 5,int y = 5,int width = 15,int height = 15);
		virtual ~CheckBox(void);

		virtual void OnPaint();

		void SetChecked(bool checked);

		virtual void OnMouse(int button, int state,int x,int y);

		virtual bool Hover_Detect(int x,int y);

	protected:
		void  draw_checkbox( int x, int y, int w, int h );
		void  draw_string();

	private:
		Control* m_pParent;
		char*    m_strName;
		char*    m_strLable;
		int      m_iPosX;
		int      m_iPosY;
		int      m_iWidth;
		int      m_iHeight;
		bool     m_Checked;
	};
}